<script lang="tsx">
import { defineComponent, ref, h } from 'vue';
import { Ban, Pencil, SquarePlay } from '@vben/icons';
import { $t } from '@vben/locales';
import { usePage,useLRLayoutPage } from '#/hooks/page/usePage';
import { Page } from '@vben/common-ui';



export default defineComponent({
  name: 'Order',
  setup() {
    const API = {
      get: () => Promise.resolve({
        code: 200,
        data: [{}]
      })
    };

    // 表格列配置
    const columns = [
      {
        prop: 'orderNumber',
        label: '订单号',
        minWidth: 130,
        showOverflowTooltip: true
      }
    ];

    // 查询配置
    const queryColumns = [
      {
        prop: 'name',
        label: '订单号',
        type: 'input',
      }
    ];

    // 操作按钮配置
    const commands = [
      {
        key: 'edit',
        width: 60,
        label: $t('common.editTxt', ['']),
        icon: Pencil,
      },
    ];

    const leftLayout = () => (
      <div class="cert w-[238px] bg-white rounded-tl-lg rounded-bl-lg border-r border-gray-200">ddd</div>
    );

    const { render, tableHandle, getTableData } = useLRLayoutPage({
      API,
      columns,
      queryColumns,
      commands
    }, leftLayout());


    return () => (
      render({
        header: (<el-button type="primary">下载</el-button>)
      })
    );
  }
});
</script>

<style scoped>
/* 使用 Page 组件的 heightOffset 属性来处理高度计算 */
</style>
